package ${package}<#if moduleName??>.${moduleName}</#if>.pojo.entity<#if subModuleName??>.${subModuleName}</#if>;


import com.baomidou.mybatisplus.annotation.*;
<#if baseClassEntity??>
import com.youlai.common.base.BaseEntity;
</#if>
import lombok.Data;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonFormat;


@Data
@TableName("${tableName}")
public class ${ClassName}<#if baseClassEntity??> extends ${baseClassEntity.code}</#if> {

<#list columnList as column>
	<#if baseClassEntity?? && baseClassEntity.fields?split(",")?seq_contains(column.columnName)>
    <#else>
	<#if column.columnComment!?length gt 0  && column.objattr>
	/**
	* ${column.columnComment}
	*/
	</#if>
	<#if "deleted"?split(",")?seq_contains(column.columnName)>
	@TableLogic
	</#if>
    <#if "creator,create_time,org_id,deleted"?split(",")?seq_contains(column.columnName)>
	@TableField(fill = FieldFill.INSERT)
	</#if>
    <#if "updater,update_time"?split(",")?seq_contains(column.columnName)>
	@TableField(fill = FieldFill.INSERT_UPDATE)
	</#if>
    <#if column.pk>
	@TableId(type = IdType.AUTO)
	</#if>
	<#if column.objattr>
	<#if column.formType == 'date'>
	@JsonFormat(pattern = "yyyy-MM-dd")
	<#elseif column.formType == 'datetime'>
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	</#if>
	private ${column.attrType} ${column.attrName};
	</#if>
	</#if>
</#list>
}
